package com.gz.thread.runnable;

public class TestRunnable {

    public static void main(String[] args) {

        new Thread(new RunnableClass()).start();

        for (int i = 0; i < 5; i++) {
            System.out.println(Thread.currentThread().getName() + "---" + i);
        }
    }
}
class RunnableClass implements Runnable {

    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println(Thread.currentThread().getName() + "---" + i);
        }
    }
}
